package controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JPanel;

import view.MainWindow;

/**
 * Call the model which sort the data by alphabetical order of the name of the contact
 * @author Marie Morin
 *
 */
public class OrderByNameController implements ActionListener{
	
	private MainWindow w;
	
	public OrderByNameController(MainWindow w){
	
		this.w=w;
		 
	}

	/**
	 *  This function is called when the user click on the button ByName after typing a word 
	 *  on the search field.
	 */
	@Override
	public void actionPerformed(ActionEvent arg0) {
		// TODO Auto-generated method stub
		
		w.setStaticSearch("clear");
		
		this.w.setLayoutNull();
	}
	

	

}
